﻿
using System.IO;
using System.ServiceModel.Activation;
using System.Threading.Tasks;
using System.Web;
using LightSO.Entity;
using LightSO.ILibrary;
using LightSO.Extensions;
using System.ServiceModel;
using System;

namespace LightSO.Business
{
    public partial class UserBll
	{
        public virtual bool Login(string loginname, string password)
        {
            if (loginname == "admin")
            {
                HttpCookie cookie = new HttpCookie("loginname", loginname);//获取用户的用户名
                cookie.Expires = DateTime.Now.AddDays(10);//设置cookie过期时间为10天后
                HttpContext.Current.Response.Cookies.Add(cookie);//将cookie写入客户端
                return true;
            }
            return false;
        }
    }
}

